import request from '../utils/request'

// 获取所有风机信息
export function getAllFansInfo() {
  return request({
    url: '/fans',
    method: 'get'

  })
}

// 修改风机信息
export function changeFanInfo(id, data) {
  return request({
    url: '/fans/' + id,
    method: 'put',
    data: data
  })
}

// 创建风机
export function addFanInfo(data) {
  return request({
    url: '/fans',
    method: 'post',
    data: data
  })
}

// 创建风机
export function delFanInfo(id) {
  return request({
    url: `/fans/${id}`,
    method: 'DELETE'
  })
}
